Upgrade LVGL to v9 and adapt project code to new APIs#104
Merged
zjwhitehead merged 4 commits intomasterfrom Mar 27, 2026
Merged
Upgrade LVGL to v9 and adapt project code to new APIs#104zjwhitehead merged 4 commits intomasterfrom
zjwhitehead merged 4 commits intomasterfrom
Conversation
Bump LVGL to v9 (platformio.ini) and update project code and config to the v9 API and data structures. Changes include: lv_conf.h rewritten for LVGL v9 config macros and memory/OS settings; switch from legacy lv_disp/lv_draw_buf APIs to lv_display-based APIs and byte-based buffers (LVGL_BUF_BYTES); update flush callback signature and usage (lv_display_flush_ready, px_map), use lv_timer_handler; convert image assets and descriptors to lv_image_dsc_t with new header/.data/.data_size fields; rename image and spinner APIs (lv_img_* -> lv_image_*, lv_spinner_set_anim_params); replace deprecated functions/types (lv_obj_clear_flag -> lv_obj_remove_flag, lv_obj_set_style_img_recolor -> lv_obj_set_style_image_recolor, lv_scr_load -> lv_screen_load, lv_refr_now/lv_disp_get_default -> lv_refr_now/lv_display_get_default, lv_screen_active()); switch point arrays to lv_point_precise_t; adjust various visibility/flag and style calls across UI files to match v9. Also add small .claude settings entries for extra PlatformIO tasks. These updates align the codebase with LVGL v9 API changes and improve rendering/flush handling for the display.
Increase character height from 24 to 30 to match lv_font_montserrat_28 line_height (v9: 30px). Update char_height in lvgl_main_screen.cpp and adjust corresponding lv_obj_set_size calls in lvgl_updates.cpp (decimal and feet positions) to use height 30 so the main screen layout matches the font metrics.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request upgrades the LVGL graphics library from v8 to v9 and updates the codebase to be compatible with the new version. The changes include significant updates to configuration files, buffer management, widget usage, and image asset handling. Additionally, there are minor improvements and corrections in alert handling and test settings.
LVGL v9 Upgrade and Compatibility Updates:
platformio.ini, requiring extensive configuration and API changes throughout the codebase.lv_conf.hfor v9 compatibility: revised color depth options, memory and OS settings, draw engine and buffer configurations, widget usage macros (renamed and added new widgets), and removed deprecated settings. [1] [2] [3] [4] [5] [6] [7] [8]Buffer and Display Driver Changes:
LVGL_BUF_BYTES), and updates display driver types fromlv_disp_drv_ttolv_display_t*. [1] [2]Image Asset Structure Updates:
lv_image_dsc_tformat, including changes to header fields and buffer pointers. [1] [2] [3]Widget and Alert Handling Improvements:
lv_obj_remove_flaginstead of the deprecatedlv_obj_clear_flag. [1] [2] [3] [4] [5]Testing and Miscellaneous:
.claude/settings.local.jsonfor PlatformIO testing and running.These changes collectively ensure the project is compatible with LVGL v9, improve maintainability, and enable new features and widgets provided by the updated library.